package com.newsee.remote.common.enumeration;

/**
 * @author liangzhi.chen
 * @description 供应商币种枚举
 * @date 2019/8/6 下午 04:30
 **/
public enum  SquareMoneyEnum {

    /**
     * 人民币
     */
    RMB(1,"人民币"),
    /**
     * 港元
     */
    HK_DOLLER(2,"港元"),
    /**
     * 美元
     */
    DOLLER(3,"美元");

    public static Integer getCodeByText(String desc) {
        for (SquareMoneyEnum type : values()) {
            if (type.getDesc().equals(desc)) {
                return type.getCode();
            }
        }
        return null;
    }

    private Integer code;

    private String desc;

    SquareMoneyEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
